package com.cencat.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 权限树形结构VO
 * 
 * @author cencat
 * @since 2025-09-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "权限树形结构VO")
public class PermissionTreeVO {

    @Schema(description = "权限ID")
    private Long id;

    @Schema(description = "权限名称")
    private String name;

    @Schema(description = "权限编码")
    private String code;

    @Schema(description = "权限类型：1-菜单，2-按钮，3-接口")
    private Integer type;

    @Schema(description = "父级权限ID")
    private Long parentId;

    @Schema(description = "路由路径")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "排序")
    private Integer sortOrder;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "子权限列表")
    private List<PermissionTreeVO> children;

    @Schema(description = "是否选中")
    private Boolean checked = false;

    @Schema(description = "是否展开")
    private Boolean expanded = false;

    @Schema(description = "是否为叶子节点")
    private Boolean isLeaf = false;

}